<template>
  <div>
    <el-table v-loading="loading" :data="processList">
      <el-table-column label="流程名称" prop="processName"></el-table-column>
      <el-table-column label="版本号" prop="version"></el-table-column>
      <el-table-column label="发布时间" prop="deployTime"></el-table-column>
      <el-table-column label="运行中实例数" prop="runningTasks"></el-table-column>
      <el-table-column label="已完成实例数" prop="completedTasks"></el-table-column>
      <el-table-column label="总创建实例数" prop="totalTasks"></el-table-column>
      <el-table-column label="操作" width="180">
        <template #default="scope">
          <el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
          <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup>
import {getProcessConfigDetailList} from "@/api/workflow/processManager";
import {useRoute} from 'vue-router';

const route = useRoute();
onMounted(() => {
  console.log('获取到的流程ID:', route.query);
  init()
})

const processList = ref([])
const loading = ref(false)
const init = () => {
  getProcessConfigDetailList(route.query).then((res) => {
    if (res.code === 200) {
      processList.value = res.data;
    }
    console.log(res);
  });
};
</script>

<style scoped lang="scss">

</style>